package org.playground.booking.dao;

import org.playground.booking.entity.Booking;
import org.playground.booking.enums.BookingStatusEnum;

import java.util.Date;
import java.util.List;

/**
 * Created by root on 17-10-29.
 */
public interface IBookingDao extends IDao<Booking,Long> {

    List<Booking> getBookingsForPlayground(Long playgroundId, Date from, Date to, BookingStatusEnum... bookingStatusEnums);


    List<Booking> getBookingsForPlayground(Long playgroundId, Date from, Date to, int pageSize, int pageNb, BookingStatusEnum... bookingStatusEnums);

    List<Booking> readBookingForUser(Long userId, int pageNb, int pageSize, BookingStatusEnum... bookingStatusEnums);

    Booking readBookingForUser(Long userId, Long bookingId);

    boolean playgroundAlreadyBooked(Long playgroundId, Date from, Date to);
}
